_REGEX_URL = /((http|https|ftp):\/\/[\w?=&.\/-;#~%!-]+(?![\w\s?&.\/;#~%!"=-]*>))/g

function handleUrlDecoration(context, data) {
	return data.replace(_REGEX_URL, '<a target="_blank" href="$1">$1</a>');
}

if(typeof chatManager != "undefined") {
	chatManager.insertDataModule(handleUrlDecoration);	
}
